import java.util.ArrayList;
import java.util.List;

import Car.ACar;
import Factory.AFactory;
import Factory.BYDFactory;
import Factory.BaoMaFactory;
import Factory.BenChiFactory;

public class App {
    public static void main(String[] args) throws Exception {
        List<ACar> MyCarList = new ArrayList<ACar>();
        AFactory mFactory = new BaoMaFactory();
        MyCarList.add(mFactory.CtreatProduct());
        MyCarList.add(mFactory.CtreatProduct());
        mFactory = new BYDFactory();
        MyCarList.add(mFactory.CtreatProduct());
        MyCarList.add(mFactory.CtreatProduct());
        mFactory = new BenChiFactory();
        MyCarList.add(mFactory.CtreatProduct());
        MyCarList.add(mFactory.CtreatProduct());
        for (ACar car : MyCarList) {
            System.err.println(car.ShowMyName());
        }
    }
}
